package com.homework07;

public class Index {
    public static void main(String[] args) {
        String s1 = "/courses/lecture/Lecture01.pdf";
        String s2 = Index.readPathTest(s1);
        System.out.println("此文件名称为" + s2);
    }
    private static String readPathTest(String path) {
        int i = path.lastIndexOf(".");
        int j = path.lastIndexOf("/");
        String s1 = path.substring(j + 1,i);
        return s1;
    }
}